import pyautogui

# 获取屏幕分辨率
screen_width, screen_height = pyautogui.size()

# 设置截图区域（假设要截取屏幕右下角的 600x400 区域）
region_left = screen_width - 600
region_top = screen_height - 400
region_width = 600
region_height = 400

# 截取屏幕指定区域并保存为图像文件
pyautogui.screenshot('shot.png', region=(region_left, region_top, region_width, region_height))

print("截图已保存为 'shot.png'")
